PROJECT(NURBS_Tools)

CMAKE_MINIMUM_REQUIRED(VERSION 2.4)


IF(COMMAND cmake_policy)
  cmake_policy(SET CMP0003 NEW)
ENDIF(COMMAND cmake_policy)


OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON)

SET(SRCS
    NURBS_Bezier.cpp
    NURBS_Tools.cpp)

SET(SRCS_IO NURBS_FileIO.cpp)

SET(VTK_DIR /org/groups/hughes/opt/lin/VTK-5.6.0)
SET(THIS_INCLUDE_DIRS ${THIS_INCLUDE_DIRS} ${VTK_DIR}/include/vtk-5.6)
SET(NURBS_LINK_DIRS ${NURBS_LINK_DIRS} ${VTK_DIR}/lib/vtk-5.6)

INCLUDE_DIRECTORIES(${THIS_INCLUDE_DIRS})

LINK_DIRECTORIES(${NURBS_LINK_DIRS})

ADD_LIBRARY(NURBS_Tools ${SRCS})

TARGET_LINK_LIBRARIES(NURBS_Tools ${NURBS_LINK_LIBS})

SET(NURBS_LINK_LIBS ${NURBS_LINK_LIBS} 
                    vtkCommon 
                    vtkIO 
                    vtkFiltering
                    vtksys
                    vtkDICOMParser
                    vtkNetCDF
                    vtkmetaio
                    vtksqlite
                    vtkpng
                    vtkzlib
                    vtkjpeg
                    vtktiff
                    vtkexpat)


ADD_LIBRARY(NURBS_FileIO ${SRCS_IO})

TARGET_LINK_LIBRARIES(NURBS_FileIO ${NURBS_LINK_LIBS} NURBS_Tools)
